<{css src="ecmall.css" app="business"}>
<{css src="style.css" app="business"}>
<{script src="dialog.js" app="business" pdir="js"}>
<{script src="modedialog.js" app="business" pdir="js"}>
<{script src="load.js" app="business" pdir="js"}>
<{script src="wpage.js" app="business" pdir="js"}>
<script>
  var W = new Wpage({});
</script>
<script>
var LAYOUT = {
  container: $('container'),
  side: $('side'),
  workground: $('workground'),
  content_main: $('main'),
  content_head: $E('#workground .content-head'),
  content_foot: $E('#workground .content-foot'),
  side_r: $('side-r'),
  side_r_content:$('side-r-content')
};
</script>
<div class="new_reg dis_bl">
<div class="title">
            <div class="title_img">
                <img src="<{$env.base_url}>/app/business/statics/images/reg_stpe03.jpg" alt="" />
            </div>
        </div>
    <div class="module_common mall_settle" style="border:0px;">
        <h2><b class="set_up_shop" ></b></h2>
        <div class="wrap">
            <div class="wrap_child">

                <div class="module_new_shop">
                    <div class="info_shop">
                        <form method="post"  id="apply_form"  action="<{link app=business ctl=site_store act=storeapplyend}>"  >
                        <table class="mall_settle_end_table width_937">
						<tr>
                                <td class="bod_none padding3" colspan="4"><h4><span><{t}>公司基本资料: </span><font style="color:#333;font-weight:100;float:right;padding-right:10px;display:block;height:30px;line-height:30px;">支持格式jpg,jpeg,png,gif,bmp，请保证图片清晰。</span><div class="crl"></div><{/t}></h4></td>
                            </tr>
                          <tr>
                           <{input class="inputstyle" name="shopinfo[store_id]" type="hidden"  id="member_id" size="30"  value=$shopinfo.store_id}>
                                <th>上传身份证:  </th>
                                <td>
                                 <{input  vtype="required&&checkex" id ='image_id' type='vimage' name='shopinfo[image_id]' width=300 height=150 value=$shopinfo.image_id}>
                                </td>
                                <!-- <td class="padding3"><span class="field_notice">支持格式jpg,jpeg,png,gif，请保证图片清晰且文件大小不超过400KB</span></td> -->
								<th>上传执照:  </th>
                                <td>
                                 <{input type='vimage'  vtype="required&&checkex" id ='image_cid' name='shopinfo[image_cid]' width=300 height=150 value=$shopinfo.image_cid}>

                                </td>
								<!--<td class="padding3"><span class="field_notice">支持格式jpg,jpeg,png,gif，请保证图片清晰且文件大小不超过400KB</span></td> -->
                            </tr>
                            
                              <tr>
                                <th>上传组织机构代码:  </th>
                                <td>
                                 <{input type='vimage' vtype="required&&checkex" id ='image_codeid' name='shopinfo[image_codeid]' width=300 height=150 value=$shopinfo.image_codeid}>

                                </td>
                                <!-- <td class="padding3"><span class="field_notice">支持格式jpg,jpeg,png,gif，请保证图片清晰且文件大小不超过400KB</span></td> -->
								<th>上传税务登记证:  </th>
                                <td>
                                 <{input type='vimage' vtype="required&&checkex" id ='image_taxid' name='shopinfo[image_taxid]' width=300 height=150 value=$shopinfo.image_taxid}>

                                </td>
                                <!-- <td class="padding3"><span class="field_notice">支持格式jpg,jpeg,png,gif，请保证图片清晰且文件大小不超过400KB</span></td> -->
                            </tr>                              

                            <tr>
                                <td colspan="4">
                                <div class="t_c">
                <a  id='prestep'  href="javascript:history.back();" class="reg_step_2_button2">上一步 &gt;</a><a  id='nextstep'  href="javascript:void(0);" class="reg_step_2_button">下一步 &gt;</a></div>
                                <!--<span class="sett_but_agr float-span" >
                                  <{button class="btn reg_back submit-btn" id="btn_back"   type='button' onclick='history.back();' label=$___b2c="上一步"|t:'b2c' }>
                                </span>
                                <span class="sett_but_agr float-span" >
                                  <{button class="btn reg_yes submit-btn" id="btn_new"    type='submit' label=$___b2c="确认"|t:'b2c' rel="_request"}>
                                </span>-->
                                
                                </td>
                            </tr>
                        </table>
                        </form>
                    </div>

                </div>

            </div>
        </div>
    </div>
</div>
</div>
<script>

$('nextstep').addEvent('click',function(e){
  var _form=$('apply_form');
  if (_form){
        if($$('input[name=shopinfo[image_id]]')[0].value){     
        } else {
           e.stop();
           Message.error('请上传证件图片！');
           return ;
        }


        if($$('input[name=shopinfo[image_cid]]')[0].value){

        } else {
              e.stop();
             Message.error('请上传执照图片！');

           return ;
        }


         if($$('input[name=shopinfo[image_codeid]]')[0].value){

        } else {
            e.stop();
             Message.error('请上传组织机构代码图片！');

           return ;
        }

          if($$('input[name=shopinfo[image_taxid]]')[0].value){

        } else {
                e.stop();
              Message.error('请上传税务登记证图片！');

           return ;
        }

       // _form.submit();
       new Request.JSON({
                    url:'<{link app=business ctl=site_store act=storeapplyend}>',
                    method:'post',
                    data:_form,
                    async:true,
  
                    onComplete:function(res){
                      //  easyDialog.close();
                        if (res.status =='success' ) 
                        {
                            Message.success(res.msg);
                            window.location=res.url;

                        }else{
                            
                             Message.error(res.msg);
                           //  $("nextstep").disabled =''; 
                          
                        }

                     }
            }).send();

  }
});


</script>


